package com.ngmaster.apiserver.util;

import com.fasterxml.jackson.annotation.JsonValue;

/**
 * 状态
 *
 */
public enum StateNo {
	
	Success("成功", 200),
	;
	
	/**
	 * 数值
	 */
	@JsonValue
	private int value;
	
	/**
	 * 描述
	 */
	private String desc;
	
	/**
	 * 构造函数
	 * @param value
	 * @param desc
	 */
	private StateNo(String desc, int value) {
		this.value = value;
		this.desc = desc;
	}
	
	/**
	 * 转化为字符串
	 */
	@Override
	public String toString() {
		return this.value + "";
	}

	public int getValue() {
		return value;
	}

	public void setValue(int value) {
		this.value = value;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
}
